package red.stu.mc.mod.codeblock;

import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import red.stu.mc.mod.codeblock.block.BlockLoader;
import red.stu.mc.mod.codeblock.client.gui.GuiContainerCodeBlock;
import red.stu.mc.mod.codeblock.inventory.GuiElementLoader;
import red.stu.mc.mod.codeblock.item.ItemLoader;
import red.stu.mc.mod.codeblock.tileentity.TileEntityLoader;

/**
 * 
 * 代码方块MOD 
 * 
 * @author yihrmc 
 *
 */
@Mod(modid = CodeBlockMod.MODID, name = CodeBlockMod.MODNAME, version = CodeBlockMod.VERSION)
public class CodeBlockMod {
	
	public static final String MODID = "codeblock";
	public static final String MODNAME = "CodeBlock";
	public static final String VERSION = "1.2.1";
	
	@Instance(CodeBlockMod.MODID)
    public static CodeBlockMod instance;
	
	/*
	 * https://fmltutor.ustc-zzzz.net
	 * gradlew build
	 */

	/*
	 * 会在Mod初始化之前触发，主要用于物品/方块/模型等的注册
	 */
	@EventHandler
	public void preInit(FMLPreInitializationEvent event) {
		new BlockLoader(event).initRenders();
		new ItemLoader(event).initRender();
		new TileEntityLoader(event);
		new GuiElementLoader();
	}

	/*
	 * 会在Mod初始化是触发，主要用于注册合成表/熔炉配方，给其它Mod发送交互信息
	 */
	@EventHandler
	public void init(FMLInitializationEvent event) {
		GuiContainerCodeBlock.initIDEGUI();
	}
	
}
